import threading


class BaseAdjust(threading.Thread):
    def __init__(self, config):
        super().__init__()
        self.config = config
        self.args = None

    def init(self, *args):
        self.args = args

    def do_adjust(self, global_resource, request_content, response_content):
        """
        根据当前adjust制定的规则,对最终输出进行调整
        :return:
        """
        pass

    def run(self) -> None:
        if not self.args:
            print("adjust service start without init")
            return
        self.do_adjust(*self.args)
